home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 7: Sunsite
/
Linux Cubed Series 7 - Sunsite Vol 1.iso
/
system
/
backup
/
kbackup-.000
/
KBackup-1.2.7.tar
/
KBackup
/
src
/
read_data_src
< prev
next >
Wrap
Text File
|
1996-01-23
|
1KB
|
66 lines
#
# /home/kbackup/.CVSROOT/KBackup/src/read_data_src,v 1.8 1996/01/23 20:24:47 kbackup Exp
#
# This file is Copyright (C) 1995 by Karsten Ballⁿder
# Karsten.Ballueder@stud.uni-karlsruhe.de
#
# It is part of the KBackup package, see the file COPYING for details.
#
#
# function to reliably read data from tape, including double buffering
# and multi-volume handling
# - for Verify() and Restore()
#
ReadData_src_loaded=YES
read_data()
{
if [ "$1" = "-raw" ]
then
shift
if [ "$1" != "" ]
then
rdfile="$1"
else
rdfile="$device"
fi
multibuf_cmd=`echo cat $rdfile`
else
if [ "$1" != "" ]
then
rdfile="$1"
else
rdfile="$device"
fi
if [ "$use_multibuf" = "YES" ]
then
set_multibuf_options READ
multibuf_cmd=`echo $MULTIBUF $multibuf_options -b $multibuf_blksize -n $multibuf_nblocks -r "$rdfile" `
else
multibuf_cmd=`echo cat "$rdfile" `
fi
fi
if [ "$remote_mode" = "YES" ]
then
if [ "$double_buffering" = "YES" ]
then
su $remote_uid -c "rsh $remote_host \"$multibuf_cmd | $DD obs=$ddbufsize | cat \""
else
su $remote_uid -c "rsh $remote_host \"$multibuf_cmd | \""
fi
else
if [ "$double_buffering" = "YES" ]
then
`echo $multibuf_cmd` | $DD obs=$ddbufsize
else
`echo $multibuf_cmd`
fi
fi
}